<?php $isMobile = wp_is_mobile(); ?>
<?php  if ( $isMobile){get_header('mobile');}else{get_header();} ?>
<?php if($isMobile): ?>
<!--信息流-->

<div class="feed-list-container">
	<div class="list_content">
	<?php
		if ( have_posts() ) : ?>
		<?php while ( have_posts() ) : the_post();?>
			<?php $current_post = $wp_query->current_post+1;
			if($current_post==10): ?>
				<?php include( 'parts/excerpt-gallery-mobile.php' );?>
			<?php else: ?>
			<?php if( has_post_format( 'aside' )) { //大图 ?>
				<?php include( 'parts/excerpt-aside.php' );?>
			<?php } else if ( has_post_format( 'gallery' )) { //相册 ?>
				<?php include( 'parts/excerpt-gallery-mobile.php' );?>
			<?php } else if ( has_post_format( 'link' )) { //无图 ?>
				<?php include( 'parts/excerpt-link-mobile.php' );?>
			<?php } else{ //标准 ?>
				<?php include( 'parts/excerpt-mobile.php' );?>
			<?php } ?>
			<?php endif; ?>
			<?php if( ztmao('ztmao_ad_1')){  ?>
			<?php
				$num = ztmao('ztmao_ad_1_num');
				$hot_num = 2;
				$current_post = $wp_query->current_post+1;
				if ($paged==0): 
					if($current_post==$hot_num||($current_post-$hot_num)%$num == 0):?>
				<section  class="feed-ad">
					<?php echo ztmao('ztmao_mobile_ad_1_url'); ?>
				</section>
			<?php endif;
				elseif($current_post%$num==0): ?>
				<section  class="feed-ad">
					<?php echo ztmao('ztmao_mobile_ad_1_url'); ?>
				</section>
			<?php endif; }?>
		<?php endwhile; endif ;?>

	</div>
	<div class="scroller-status" style="display: none;">
	  <div class="infinite-scroll-request list_bottom">
	  	<p class="loadmoretip"><a href="#">加载中...</a></p>
	  </div>
	  <p class="infinite-scroll-last transition">沒有更多了...</p>
	  <p class="infinite-scroll-error transition">加载失败...</p>
	</div>
</div>
<!-- 下一页链接 -->
<div class="get-mod-more js-get-mod-more-list transition" id="ias_trigger_1491535138273" style="display: none;">
	 		<?php {
			next_posts_link('下一页','');
			}?>	
</div>
<!--底部 -->
<?php get_footer('mobile');?>
<?php else: ?>
<?php include( 'parts/archive-banner.php' ); ?>
<!--主要内容 -->
<div id="cont-list">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-8 col-lg-8 cont-left">
<!--文章列表 -->
	<div class="feed-infinite-wrapper">
		<?php if ( have_posts() ) : ?>
			<?php while ( have_posts() ) : the_post();?>
				<?php $current_post = $wp_query->current_post+1;
				 if($current_post==10): ?>
					<?php include( 'parts/excerpt-gallery.php' );?>
				<?php else: ?>
				<?php if( has_post_format( 'aside' )) { //大图 ?>
					<?php include( 'parts/excerpt-aside.php' );?>
				<?php } else if ( has_post_format( 'gallery' )) { //相册 ?>
					<?php include( 'parts/excerpt-gallery.php' );?>
				<?php } else if ( has_post_format( 'link' )) { //无图 ?>
					<?php include( 'parts/excerpt-link.php' );?>
				<?php } else{ //标准 ?>
					<?php include( 'parts/excerpt.php' );?>
				<?php } ?>
				<?php endif; ?>
				<?php if( ztmao('ztmao_ad_1')){  ?>
					<?php
						$num = ztmao('ztmao_ad_1_num');
						$hot_num = 2;
						if ($paged==0):
							if($current_post==$hot_num||($current_post-$hot_num)%$num == 0):?>
						<div id="adv03" class="line-botm">
							<?php echo ztmao('ztmao_ad_1_url'); ?>
						</div>
					<?php endif;
						elseif($current_post%$num==0):?>
						<div id="adv03" class="line-botm">
							<?php echo ztmao('ztmao_ad_1_url'); ?>
						</div>
				<?php endif; }?>
			<?php endwhile; endif ;?>
		<?php wp_reset_query(); ?>
	</div>
	<div class="get-mod-more js-get-mod-more-list transition" style="display: none;">
		<?php next_posts_link('点击加载更多','');?>	
	</div>

	<div class="scroller-status" style="display: none;">
	  <div class="infinite-scroll-request loader-ellips loading ball-pulse"><div></div> <div></div> <div></div> <span>加载中⋅⋅⋅</span></div>
	  <p class="infinite-scroll-last transition">沒有更多了...</p>
	  <p class="infinite-scroll-error js-get-mod-more-list transition">加载失败...</p>
	</div>
</div>
<?php get_sidebar();?>
</div>
</div>
</div>
<!--底部 -->
<?php get_footer();?>
<?php endif; ?>